<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="deviceTypeList" checkbox="true" fitColumns="true" title="设备信息" actionUrl="studentAppointAuditController.do?datagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
      <t:dgCol title="主键"  field="courseSchedule_courseOrderEnd"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   
   
    <t:dgCol title="项目名称"  field="teachItem.itemName"  queryMode="group"   width="100"></t:dgCol> 
   <t:dgCol title="申请人"  field="appointUser.realName"  queryMode="group"   width="100"></t:dgCol> 
   <t:dgCol title="学工号"  field="appointUser.staffNo"  queryMode="group"   width="100"></t:dgCol> 
   <t:dgCol title="班级"  field="appointUser.stuClass.className"  queryMode="group"   width="100"></t:dgCol>  
   <t:dgCol title="实验室"  field="openRecord.lab.name"  queryMode="group"   width="100"></t:dgCol> 
   <t:dgCol title="预约日期"  field="openRecord.openDate" formatter="yyyy-MM-dd" queryMode="group"   width="100"></t:dgCol>  
   <t:dgCol title="上课节次"  field="openRecord_lesson"     queryMode="single"  width="120"></t:dgCol>
    
   <t:dgCol title="操作" field="opt" width="160"></t:dgCol>
   <t:dgFunOpt funname="doAudit(id)" title="审核通过"></t:dgFunOpt> 
   <t:dgDelOpt title="删除" url="studentAppointAuditController.do?doDel&id={id}" />
     
   </t:datagrid>
  </div>
 </div>
  <script type="text/javascript">
 $(document).ready(function(){
 		//给时间控件加上样式
 		$("#deviceTypeListtb").find("input[name='createDate_begin']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 		$("#deviceTypeListtb").find("input[name='createDate_end']").attr("class","Wdate").click(function(){WdatePicker({dateFmt:'yyyy-MM-dd'});});
 }); 
 

//导出
function ExportXls() {
	JeecgExcelExport("studentAppointAuditController.do?exportXls","deviceTypeList");
} 

function doAudit(id){
	 $.dialog.confirm('你确定要审核通过吗?', function(r) {
		   if (r) {
				 
			   $.ajax({
					 url:"studentAppointAuditController.do?doAudit&id="+id,
					 success:function(data){
						 data = $.parseJSON(data);
						 tip(data.msg)
						 if(data.success){
							 reloadTable();
						 }
					 }
				 });
			   
			}
		}); 
}
 
 
 </script>